package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 
 *
 * @author code-generate
 * @date 2021-08-06
 */
@Data
@DbTable(tableName = "t_contract")
public class Contract extends BaseEntity {
        /**
     * 合同ID
     */
    @DbTableField(columnName = "c_contract_id", dbType = DbTypeEnum.VARCHAR)
    public String contractId ;

    /**
     * 合同名称
     */
    @DbTableField(columnName = "c_name", dbType = DbTypeEnum.VARCHAR)
    public String name ;

    /**
     * 合同编码
     */
    @DbTableField(columnName = "c_contract_code", dbType = DbTypeEnum.VARCHAR)
    public String contractCode ;

    /**
     * 中标日期
     */
    @DbTableField(columnName = "c_bidding_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, timezone = "GMT+8", pattern = "yyyy-MM-dd")
    public LocalDateTime biddingDate ;

    /**
     * 合同金额
     */
    @DbTableField(columnName = "c_bidding_money", dbType = DbTypeEnum.DECIMAL)
    public BigDecimal biddingMoney ;

    /**
     * 服务开始日期
     */
    @DbTableField(columnName = "c_service_start_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd",timezone = "GMT+8")
    public LocalDateTime serviceStartDate ;

    /**
     * 服务结束日期
     */
    @DbTableField(columnName = "c_service_end_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, timezone = "GMT+8", pattern = "yyyy-MM-dd")
    public LocalDateTime serviceEndDate ;


    /**
     * 企业联络人A
     */
    @DbTableField(columnName = "c_company_person_a", dbType = DbTypeEnum.VARCHAR)
    public String companyPersonA ;

    /**
     * 企业联络人A联系方式
     */
    @DbTableField(columnName = "c_company_person_a_phone", dbType = DbTypeEnum.VARCHAR)
    public String companyPersonAPhone ;

    /**
     * 企业联络人B
     */
    @DbTableField(columnName = "c_company_person_b", dbType = DbTypeEnum.VARCHAR)
    public String companyPersonB ;

    /**
     * 企业联络人B联系方式
     */
    @DbTableField(columnName = "c_company_person_b_phone", dbType = DbTypeEnum.VARCHAR)
    public String companyPersonBPhone ;

    /**
     * 监管单位联络人
     */
    @DbTableField(columnName = "c_manager_person", dbType = DbTypeEnum.VARCHAR)
    public String managerPerson ;

    /**
     * 监管单位联系方式
     */
    @DbTableField(columnName = "c_manager_person_phone", dbType = DbTypeEnum.VARCHAR)
    public String managerPersonPhone ;

    /**
     * 采购单位ID t_sys_dept.c_id
     */
    @DbTableField(columnName = "c_manage_dept_id", dbType = DbTypeEnum.INTEGER)
    public Integer manageDeptId ;

    /**
     * 企业ID t_comapny.c_id
     */
    @DbTableField(columnName = "c_company_id", dbType = DbTypeEnum.INTEGER)
    public Integer companyId ;

    /**
     * 所在项目组ID t_compay_team.c_id
     */
    @DbTableField(columnName = "c_team_id", dbType = DbTypeEnum.INTEGER)
    public Integer teamId ;

    /**
     * 合同状态（-1：停用；0：待审核；1：审核通过；2：审核失败；3：审核中）
     */
    @DbTableField(columnName = "c_state", dbType = DbTypeEnum.INTEGER)
    public Integer state  = 0 ;

    /**
     * 合同状态描述
     */
    @DbTableField(columnName = "c_state_desc", dbType = DbTypeEnum.VARCHAR)
    public String stateDesc ;

    /**
     * 合同是否到期(0:否，1是)
     */
    @DbTableField(columnName = "c_is_timeout", dbType = DbTypeEnum.BIT)
    public Boolean isTimeout ;

    /**
     * 备注
     */
    @DbTableField(columnName = "c_remark", dbType = DbTypeEnum.VARCHAR)
    public String remark ;



    /**
     * 创建人员ID t_sys_user.c_id
     */
    public Integer dbCreateId ;



    /**
     * 最后更新人员ID t_sys_user.c_id
     */
    public Integer dbLastUpdateId ;

    /**
     * 标段Id t_section.c_id
     */
    @DbTableField(columnName = "c_section_id", dbType = DbTypeEnum.INTEGER)
    public Integer sectionId ;

    @ApiModelProperty(value = "文件")
    public List<ContractFile> fileList;
}
